package com.study.jdk;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by tan on 2017/9/6.
 */
public class TimerTest {
	public static void main(String[] args) throws InterruptedException {
		Timer timer = new Timer();
		timer.schedule(new MyTask(), 1000, 1000);
	}
}

class MyTask extends TimerTask {
	@Override
	public void run() {
		System.out.println("dddd");
	}
}
